<template>
  <ul>
    <li>消息编号：{{id}}</li>
    <li>消息标题：{{title}}</li>
    <!-- <li>id:{{a}}</li>
    <li>title:{{b}}</li> -->
  </ul>
</template>

<script>
export default {
    name:'Detail',
    props:['id','title'],
    // 计算属性
    computed: {
      /* id(){
        return this.$route.params.id
      },
      title(){
        return this.$route.params.title
      } */
    },
    // 生命周期狗子函数（挂载完毕）
    mounted() {
        console.log(this.$route);
    }
}
</script>